import json

import httpx
import tg_api
from tg_api import SyncTgClient, SendMessageRequest, GetUpdatesRequest, Update
import os
from dotenv import load_dotenv

load_dotenv()
TELEGRAM_BOT_TOKEN = os.getenv('TELEGRAM_BOT_TOKEN')
CHAT_ID = os.getenv('CHAT_ID')
WEBHOOK_URL = os.getenv('WEBHOOK_URL')
WEBHOOK_TOKEN = os.getenv('WEBHOOK_TOKEN')


def main():
    with SyncTgClient.setup(token=TELEGRAM_BOT_TOKEN):
        tg_api.SendMessageRequest(chat_id=CHAT_ID, text='Я есть бот. Моя знать про тебя').send()

        inline_keyboard = {
            "inline_keyboard": [
                [{"text": "Button 1", "callback_data": "button1_data"},
                 {"text": "Button 2", "callback_data": "button2_data"}],
                [{"text": "Button 3", "callback_data": "button3_data"}]
            ]
        }

        tg_api.SendUrlPhotoRequest(
            chat_id=CHAT_ID,
            photo='https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSQmwBlIrYEotbanL9oF5hX2XuileWhQJ--9w&s',
            reply_markup=inline_keyboard
        ).send()



if __name__ == '__main__':
    main()